#include ".MODULE/cpp/wa_interface.h"

#include "cpp_counter.h"

/************* Function Block cpp_counter *************/

cpp_counter_Base *new_FB_cpp_counter(cpp_counter_Data *data) {
    /* Add initialization logic here if needed */
    return new class cpp_counter();
}

cpp_counter::cpp_counter(): cpp_counter_Base() {

}

cpp_counter::~cpp_counter() {

}

void cpp_counter::call(cpp_counter_Data *data) {
    data->CNT += data->IN1;
}

int cpp_counter::save(void *buffer, int size) {
    return 0;
}

bool cpp_counter::restore(void *instance_data, int size) {
    return true;
}

/*********** End Function Block cpp_counter ***********/
